﻿using System.Collections.Generic;
using System.Linq;
using Journal.Domain.Models;

namespace Journal.Domain.RepositoryInterfaces
{
    public interface IBaseRepository<T> where T : IBaseDomainModel
    {
        T Add(T model);

        T Save(T model);

        IList<T> GetAll();

        T Get(int id);

        void Delete(int id);

        void Delete(T model);

        IQueryable<T> Query();

        IQueryable<U> Query<U>() where U : IBaseDomainModel;
    }
}